﻿using Grpc.Core;
using Grpc.Health.V1;

namespace ED.BaseServerGRPC
{
    public class HealCheck: Health.HealthBase
    {
        public override Task<HealthCheckResponse> Check(HealthCheckRequest request, ServerCallContext context)
        {
            // 在这里实现具体的健康检查逻辑

            // 返回健康状态
            var response = new HealthCheckResponse();

            // 在此处实现自定义的健康检查逻辑

            // 根据实际情况设置服务的状态
            response.Status = HealthCheckResponse.Types.ServingStatus.Serving;

            return Task.FromResult(response);

        }
    }
}
